using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._BusinessAnalystTools._TradeAreas
{
    /// <summary>
    /// <para>Generate Standard Geography Trade Areas</para>
    /// <para>Creates trade areas based on predefined named statistical areas. This tool does not consume credits.</para>
    /// <para>根据预定义的命名统计区域创建贸易区域。此工具不消耗积分。</para>
    /// </summary>    
    [DisplayName("Generate Standard Geography Trade Areas")]
    public class StandardGeographyTA : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public StandardGeographyTA()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_geography_level">
        /// <para>Geography Level</para>
        /// <para>The geography level that will be used to define the trade area.</para>
        /// <para>将用于定义贸易区的地理级别。</para>
        /// </param>
        /// <param name="_out_feature_class">
        /// <para>Output Feature Class</para>
        /// <para>The output feature containing the trade area.</para>
        /// <para>包含贸易区的输出要素。</para>
        /// </param>
        public StandardGeographyTA(object _geography_level, object _out_feature_class)
        {
            this._geography_level = _geography_level;
            this._out_feature_class = _out_feature_class;
        }
        public override string ToolboxName => "Business Analyst Tools";

        public override string ToolName => "Generate Standard Geography Trade Areas";

        public override string CallName => "ba.StandardGeographyTA";

        public override List<string> AcceptEnvironments => ["baDataSource", "workspace"];

        public override object[] ParameterInfo => [_geography_level, _out_feature_class, _input_type.GetGPValue(), _in_ids_table, _geography_key_field, _ids_list, _summarize_duplicates.GetGPValue(), _group_field, _dissolve_output.GetGPValue()];

        /// <summary>
        /// <para>Geography Level</para>
        /// <para>The geography level that will be used to define the trade area.</para>
        /// <para>将用于定义贸易区的地理级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geography Level")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _geography_level { get; set; }


        /// <summary>
        /// <para>Output Feature Class</para>
        /// <para>The output feature containing the trade area.</para>
        /// <para>包含贸易区的输出要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Feature Class")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Input Type</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the geography IDs will be from a table or a list.</para>
        ///   <bulletList>
        ///     <bullet_item>Table—The input IDs will be from a table.</bullet_item><para/>
        ///     <bullet_item>List—The input IDs will be from a list. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定地理 ID 是来自表还是列表。</para>
        ///   <bulletList>
        ///     <bullet_item>表 - 输入 ID 将来自表。</bullet_item><para/>
        ///     <bullet_item>列表 - 输入 ID 将来自列表。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _input_type_value _input_type { get; set; } = _input_type_value._LIST;

        public enum _input_type_value
        {
            /// <summary>
            /// <para>Table</para>
            /// <para>Table—The input IDs will be from a table.</para>
            /// <para>表 - 输入 ID 将来自表。</para>
            /// </summary>
            [Description("Table")]
            [GPEnumValue("TABLE")]
            _TABLE,

            /// <summary>
            /// <para>List</para>
            /// <para>List—The input IDs will be from a list. This is the default.</para>
            /// <para>列表 - 输入 ID 将来自列表。这是默认设置。</para>
            /// </summary>
            [Description("List")]
            [GPEnumValue("LIST")]
            _LIST,

        }

        /// <summary>
        /// <para>Geography IDs Table</para>
        /// <para>The input table with IDs that will be used to select geographies that will define the trade area.</para>
        /// <para>具有 ID 的输入表，将用于选择将定义贸易区域的地理位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geography IDs Table")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _in_ids_table { get; set; } = null;


        /// <summary>
        /// <para>Geography Key Field</para>
        /// <para>A field in Geography IDs Table that identifies the records that will be included in the output.</para>
        /// <para>Geography ID 表中的一个字段，用于标识将包含在输出中的记录。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geography Key Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _geography_key_field { get; set; } = null;


        /// <summary>
        /// <para>Geography IDs List</para>
        /// <para>The input list of comma-separated geography IDs.</para>
        /// <para>逗号分隔的地理 ID 的输入列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Geography IDs List")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _ids_list { get; set; } = null;


        /// <summary>
        /// <para>Summarize Duplicate IDs</para>
        /// <para><xdoc>
        ///   <para>Specifies whether duplicate fields in the table containing matching geography IDs will be summarized.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The numeric fields for all duplicate records will be summarized.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The data of the first record will be appended. Other records will be ignored. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否汇总包含匹配地理 ID 的表中的重复字段。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将汇总所有重复记录的数值字段。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将追加第一条记录的数据。其他记录将被忽略。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Summarize Duplicate IDs")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _summarize_duplicates_value _summarize_duplicates { get; set; } = _summarize_duplicates_value._false;

        public enum _summarize_duplicates_value
        {
            /// <summary>
            /// <para>SUMMARIZE_DUPLICATES</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SUMMARIZE_DUPLICATES")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>USE_FIRST</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("USE_FIRST")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Group Field</para>
        /// <para>The field that will be used to perform a group by operation.</para>
        /// <para>将用于执行分组依据操作的字段。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Group Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _group_field { get; set; } = null;


        /// <summary>
        /// <para>Dissolve Output Features</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the output will be dissolved based on the Group Field parameter value.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—The output will be dissolved.</bullet_item><para/>
        ///     <bullet_item>Unchecked—The output will not be dissolved. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否根据“组字段”参数值解散输出。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 输出将被溶解。</bullet_item><para/>
        ///     <bullet_item>未选中 - 输出将不溶解。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Dissolve Output Features")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _dissolve_output_value _dissolve_output { get; set; } = _dissolve_output_value._false;

        public enum _dissolve_output_value
        {
            /// <summary>
            /// <para>DISSOLVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DISSOLVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DONT_DISSOLVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DONT_DISSOLVE")]
            [GPEnumValue("false")]
            _false,

        }

        public StandardGeographyTA SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}